
const { exec } = require('child_process');


const runShell = (shell, cwd) =>new Promise((resolved, rejected)=>{
    exec(shell,{
        cwd: cwd || process.cwd()
    },(err, stidio)=>{
        if(err){
            rejected(err)
        }else{
            resolved(stidio)
        }
    })
})


module.exports = runShell;